Ticket #8279: Test Plot Spectra.py

File Test Plot Spectra.py, 1.2 KB (added by Peter Parker, 7 years ago)
Line 
1dataX = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]
2dataY = [1,2,3,4,5,6,7,8,9,10,11,12]
3dataE = [1,2,3,4,5,6,7,8,9,10,11,12]
4
5smallDataX = [1,2,3,4]
6smallDataY = [1,2,3]
7smallDataE = [1,2,3]
8
9even = CreateWorkspace(DataX=dataX, DataY=dataY, DataE=dataE, NSpec=4,UnitX="Wavelength")
10odd = CreateWorkspace(DataX=dataX, DataY=dataY, DataE=dataE, NSpec=4,UnitX="Wavelength")
11consecutive = CreateWorkspace(DataX=dataX, DataY=dataY, DataE=dataE, NSpec=4,UnitX="Wavelength")
12
13singleEven = CreateWorkspace(DataX=smallDataX, DataY=smallDataY, DataE=smallDataE, NSpec=1,UnitX="Wavelength")
14singleOdd = CreateWorkspace(DataX=smallDataX, DataY=smallDataY, DataE=smallDataE, NSpec=1,UnitX="Wavelength")
15
16even.getSpectrum(0).setSpectrumNo(0)
17even.getSpectrum(1).setSpectrumNo(2)
18even.getSpectrum(2).setSpectrumNo(4)
19even.getSpectrum(3).setSpectrumNo(6)
20
21odd.getSpectrum(0).setSpectrumNo(1)
22odd.getSpectrum(1).setSpectrumNo(3)
23odd.getSpectrum(2).setSpectrumNo(5)
24odd.getSpectrum(3).setSpectrumNo(7)
25
26consecutive.getSpectrum(0).setSpectrumNo(2)
27consecutive.getSpectrum(1).setSpectrumNo(3)
28consecutive.getSpectrum(2).setSpectrumNo(4)
29consecutive.getSpectrum(3).setSpectrumNo(5)
30
31singleEven.getSpectrum(0).setSpectrumNo(4)
32singleOdd.getSpectrum(0).setSpectrumNo(5)